
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class WebviewPage extends StatefulWidget{
  const WebviewPage({Key key,this.url,this.title}) :super(key: key);
  final String url;
  final String title;
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return WebviewPageState(
      url: url,
      title: title
    );
  }
  
}

class WebviewPageState extends State{
  WebviewPageState({this.url,this.title});
  var url;
  var title;
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: new Text(title)
      ),
      body: WebView(
        initialUrl: url,
        javascriptMode: JavascriptMode.unrestricted,
      )
    );
  }
  
}